$(document).ready(function(){
	
	//bestsellers
	var v_slider=new jslider({
		'sel_container':'#bestsellers .vertical',
		'sel_slider':'#bestsellers .vertical .js_slider_container',
		'sel_items':'#bestsellers .vertical .js_slider_container .slider_item',
		'sel_arr_l':'#bestsellers_up',
		'sel_arr_r':'#bestsellers_down',
		'onpage_level':990,
		'onpage_great':1,
		'onpage_less':1,
		'sel_items_width':0,
		'page_selector':false,
		'page_selector_item':false,
		'auto_play':true,
		'auto_play_delay':1000*2,
		'orient':'vertical'
	});
	
	//bestcurorts
	var v1_slider=new jslider({
		'sel_container':'#bestcurorts .vertical',
		'sel_slider':'#bestcurorts .vertical .js_slider_container',
		'sel_items':'#bestcurorts .vertical .js_slider_container .slider_item',
		'sel_arr_l':'#bestcurorts_up',
		'sel_arr_r':'#bestcurorts_down',
		'onpage_level':990,
		'onpage_great':1,
		'onpage_less':1,
		'sel_items_width':0,
		'page_selector':false,
		'page_selector_item':false,
		'auto_play':true,
		'auto_play_delay':1000*3,
		'orient':'vertical'
	});
	
	if( !detecter.is_safari || detecter.ver!='4.0.4'){
	  $('.styled-select').removeClass('styled-select');
		$('select.simul').flyweightCustomSelect({'alignTo': '.parent'});
	}

	if($('#hotels_top').get().length>0){
	
	  $('#hotels_top .tabber_nav a').click(function(){
	    if( $(this).hasClass('active') ) return false;
	    var t=$(this).attr('class').replace('for_','');
	    
	    if( $('#hotels_top').find('#'+t).get().length<1 ) return false;

      $('#hotels_top .tabber_nav .active').removeClass('active');
			$('#hotels_top').find('.tabber_item').hide();
			
			$(this).addClass('active');
	    $('#hotels_top').find('#'+t).show();
	    return false;
		});
	}
});
